<?php
namespace ypin\lib;

use think\App;

/**
 * 自定义服务基类
 * Class Service
 * @package ypin\lib
 */
abstract class Service
{
    public function __construct(App $app)
    {
        $this->app = $app;
        $this->initialize();
    }

    /**
     * 初始化服务
     * @return static
     */
    protected function initialize()
    {
        return $this;
    }

    /**
     * 静态实例对象
     * @param array $var
     * @param bool $new
     */
    public static function instance(array $var = [], bool $new = false)
    {
        //
    }
}